<seed-content class="gray-background">
  <seed-toolbar-header>
    <seed-toolbar-title>订单详情</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>

  <div class="wrap" *ngIf="goodsList.length > 0 ">
    <div class="gap" *ngIf="orderInfo.status != 1"></div>
    <div class="statusbar " *ngIf="orderInfo.status == 1 && times.payTime > 0">
      <div class="order-hint">
        <!--{{goodsOne.userStatusMessage}}-->
        订单已生成，请在 {{times.minute}} : {{times.second}} 分钟内付款
      </div>

    </div>

    <div class="order-item" *ngIf="orderInfo">
      <p class="order-title seed-flexbox seed-flexbox-align-center seed-underline">
        <img [src]="orderInfo?.vendorIconUrl" seed-load-img>
        <span class="title text-ellipsis">{{orderInfo.vendorNickname}}</span>
        <span class="right">{{ orderService.handlePaymentStatus(orderInfo.status) }}</span>
      </p>
      <seed-order-goods [goodList]="goodsList"></seed-order-goods>
      <div class="order-border-bottom">
        <div class="bottom-total">
          <p><span>商品总价</span><span>￥{{ orderInfo.price | twoDotPrice}}</span></p>
          <p><span>运费</span><span>￥0.00</span></p>
          <p><span>优惠券</span><span>-￥{{ orderInfo.couponPrice | twoDotPrice}}</span></p>
          <p><span>活动优惠</span><span>-￥{{ orderInfo.preferentialPrice  | twoDotPrice}}</span></p>
          <p class="price"><span>实付款</span><span>￥{{ orderInfo.total | twoDotPrice}}</span></p>
        </div>
      </div>
      <div class="gap"></div>
    </div>

    <div class="detail-item">
      <div class="detail-msg">
        <p><i>订单编号:</i>&nbsp;&nbsp;<span>{{orderInfo.orderNumber}}</span></p>
        <p><i>创建时间:</i>&nbsp;&nbsp;<span>{{orderInfo.createDate | amDateFormat:'YYYY-MM-DD HH:MM'}}</span></p>
        <div
          *ngIf="orderInfo.total !== 000 && orderInfo.status == 4 || orderInfo.total !== 000 && orderInfo.status == 2 ">
          <p><i>支付方式:</i>&nbsp;&nbsp;<span>{{orderInfo.gatewayName}}</span></p>
          <p><i>支付编号:</i>&nbsp;&nbsp;<span>{{orderInfo.transactionNumber }}</span></p>
          <p><i>付款时间:</i>&nbsp;&nbsp;<span>{{orderInfo.tradeTime | amDateFormat:'YYYY-MM-DD HH:MM'}} </span></p>
        </div>

      </div>
      <div class="gap"></div>
    </div>

    <div class="detail-item" *ngIf="goodsOne.goodsCateCode1 != 'V18'">
      <div class="detail-msg">
        <p>
          <i>{{orderInfo.receiptUserName}}</i>
          <span>{{orderInfo.phone | slice: 0:3}}****{{orderInfo.phone | slice: 7:11 }}</span>
        </p>
        <p class="seed-flexbox seed-flexbox-align-center"><i class="icon_address"></i>&nbsp;&nbsp;<span>{{orderInfo.address}}</span>
        </p>
      </div>
      <div class="gap"></div>
    </div>

  </div>
 <div class="detail-foot seed-scroll-outside">
    <button class="ticket" (click)="goToPayInfo()" *ngIf="orderInfo.isTicketerInfo && orderInfo.isTicketerInfo == 1">
      查看取票人信息
    </button>
    <button class="ticket" (click)="checkLogistics()"
            *ngIf="orderInfo.isLogisticsInfo && orderInfo.isLogisticsInfo == 1">查看物流
    </button>
  </div>
  <!--缺省图-->
  <missing-default-content *ngIf="goodsList.length==0"></missing-default-content>

  <div class="detail-foot seed-scroll-outside"
       *ngIf=" orderInfo.status != 5 && orderInfo.status != 2 && goodsList.length > 0 ">
    <button downloadApp [text]="'请下载App操作!'">取消订单</button>
    <button class="wanshan" (click)="goToPayment()" *ngIf="orderInfo.status == 1">立即支付</button>
    <button class="wanshan" (click)="goToSignUp()" *ngIf="orderInfo.status == 9">完善信息</button>
  </div>
</seed-content>




